Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.brownfield.bootstrap.agent.md

Displaying Raw β€’ View rendered β€’ Download

.github/agents/speckit.brownfield.bootstrap.agent.md 4e48e64e786b58d7c73280f7aa6ebf55be9e53e5 (4e48e64e) Text, 5.75 KB

---
Tc9d1d9description: Generate spec-kit configuration tailored to the existing codebase
Tc9d1d9---


<!-- Extension: brownfield -->
<!-- Config: .specify/extensions/brownfield/ -->
Tc9d1d9# Bootstrap Spec-Kit

Generate a customized spec-kit configuration for an existing codebase. Uses the project profile from Ta5d6ff`/speckit.brownfield.scan` (or performs a scan if none exists) to create a constitution, templates, and agent configuration that match the project's actual architecture, tech stack, and conventions.

Tc9d1d9## User Input

Ta5d6ff```Ta5d6fftext
$ARGUMENTS
Ta5d6ff```

You **MUST** consider the user input before proceeding (if not empty). The user may specify preferences (e.g., "strict TDD", "minimal constitution"), a target directory for a monorepo module, or request specific template customizations.

Tc9d1d9## Prerequisites

Tff7b721. Verify the current directory is a git repository
Tff7b722. Verify a spec-kit project exists by checking for Ta5d6ff`.specify/` directory (run Ta5d6ff`specify init` first if missing)
Tff7b723. Check if a project profile exists from a previous scan β€” if not, run a scan first

Tc9d1d9## Outline

Tff7b721. **Load or generate project profile**: Check if Ta5d6ff`/speckit.brownfield.scan` has been run:
Tff7b72- If a project profile exists, use it
Tff7b72- If not, perform an inline scan to gather tech stack, architecture, and conventions
Tff7b72- Confirm the profile with the user before proceeding

Tff7b722. **Generate constitution**: Create Ta5d6ff`.specify/memory/constitution.md` tailored to the project:

The constitution **MUST** include:
Tff7b72- **Project identity**: Name, purpose, primary language(s), architecture pattern
Tff7b72- **Code boundaries**: Which directories contain which types of code (e.g., "frontend code lives in Ta5d6ff`client/`, backend in Ta5d6ff`server/`")
Tff7b72- **Naming conventions**: File naming, variable naming, branch naming as detected
Tff7b72- **Testing requirements**: Test framework, test location, coverage expectations
Tff7b72- **Dependency rules**: How modules depend on each other, what imports are allowed
Tff7b72- **Quality gates**: Linting, formatting, CI checks that must pass

The constitution **MUST NOT**:
Tff7b72- Override existing project standards without user confirmation
Tff7b72- Invent conventions that don't exist in the codebase
Tff7b72- Include generic boilerplate unrelated to the actual project

Tff7b723. **Customize spec template**: Modify Ta5d6ff`.specify/templates/spec-template.md` to reflect the project:
Tff7b72- Add project-specific sections (e.g., "Database Migrations" for projects with ORMs)
Tff7b72- Include architecture-aware requirements (e.g., "Frontend Requirements" and "API Requirements" for full-stack projects)
Tff7b72- Reference actual module paths instead of generic placeholders

Tff7b724. **Customize plan template**: Modify Ta5d6ff`.specify/templates/plan-template.md` to reflect the project:
Tff7b72- Include module-aware implementation sections (e.g., separate phases for frontend/backend)
Tff7b72- Reference actual test frameworks and build tools
Tff7b72- Include project-specific complexity factors

Tff7b725. **Customize tasks template**: Modify Ta5d6ff`.specify/templates/tasks-template.md` to reflect the project:
Tff7b72- Task phases should map to the project's actual module structure
Tff7b72- Include project-specific setup tasks (e.g., database migration, dependency install)
Tff7b72- Reference actual test commands (e.g., Ta5d6ff`npm test`, Ta5d6ff`pytest`, Ta5d6ff`go test ./...`)

Tff7b726. **Generate AGENTS.md** (if multi-module): For monorepos and multi-module projects:
Tff7b72- Define agent boundaries per module
Tff7b72- Specify which agent owns which directories
Tff7b72- Set up inter-agent communication rules

Tff7b727. **Present changes**: Show the user what will be created or modified:

Ta5d6ff ```Ta5d6ffmarkdown
# Bootstrap Plan

| File | Action | Description |
|------|--------|-------------|
| Ta5d6ff`.specify/memory/constitution.md` | Create | Project-specific constitution with detected conventions |
| Ta5d6ff`.specify/templates/spec-template.md` | Modify | Add project-specific sections (Database Migrations, API Contract) |
| Ta5d6ff`.specify/templates/plan-template.md` | Modify | Add module-aware phases (frontend, backend, shared) |
| Ta5d6ff`.specify/templates/tasks-template.md` | Modify | Add actual test commands and build steps |
| Ta5d6ff`AGENTS.md` | Create | Agent boundaries for frontend and backend modules |

Proceed with bootstrap? (confirm before writing)
Ta5d6ff ```

Tff7b728. **Execute bootstrap**: After user confirmation, write all files.

Tff7b729. **Report**:

Ta5d6ff ```Ta5d6ffmarkdown
# Bootstrap Complete

| Artifact | Status |
|----------|--------|
| Constitution | βœ… Created β€” 12 rules from detected conventions |
| Spec template | βœ… Customized β€” added Database Migrations, API Contract sections |
| Plan template | βœ… Customized β€” frontend/backend phase split |
| Tasks template | βœ… Customized β€” actual test commands included |
| AGENTS.md | βœ… Created β€” 2 agents (frontend, backend) |

## Next Steps
Tff7b72- Review Ta5d6ff`.specify/memory/constitution.md` and adjust any rules
Tff7b72- Run Ta5d6ff`/speckit.brownfield.validate` to verify configuration matches project
Tff7b72- Run Ta5d6ff`/speckit.brownfield.migrate` to reverse-engineer specs for existing features
Tff7b72- Start new features with Ta5d6ff`/speckit.specify` β€” templates are now project-aware
Ta5d6ff ```

Tc9d1d9## Rules

Tff7b72- **Always confirm before writing** β€” show the bootstrap plan and wait for approval
Tff7b72- **Never overwrite without asking** β€” if constitution or templates already exist, show a diff and ask
Tff7b72- **Derive from reality** β€” every constitution rule must trace to something detected in the codebase
Tff7b72- **No invented conventions** β€” if the project has no consistent pattern for something, say so instead of guessing
Tff7b72- **Respect existing spec-kit setup** β€” if Ta5d6ff`.specify/` already has customizations, merge rather than replace
Tff7b72- **Module-aware** β€” for monorepos, generate configuration that respects module boundaries

Served by rngit 1.5.2 - Generated in 0.09s